package com.yhd.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 课程信息主表
 */
@Data
public class CourseDto implements Serializable {
    /**
     * 主键
     */
    @Column(name = "ID")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "jdbc")
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 名字
     */
    @Column(name = "name")
    @ApiModelProperty(value = "名字")
    private String name;

    /**
     * 简介
     */
    @Column(name = "title")
    @ApiModelProperty(value = "简介")
    private String title;

    /**
     * 封面
     */
    @Column(name = "cover")
    @ApiModelProperty(value = "封面")
    private String cover;

    /**
     * 图片介绍 逗号隔开
     */
    @Column(name = "imgs")
    @ApiModelProperty(value = "图片介绍 逗号隔开")
    private String imgs;

    /**
     * 类型 activity:活动，course:课程， team:师资
     */
    @Column(name = "type")
    @ApiModelProperty(value = "类型 activity:活动，course:课程, team:师资")
    private String type;
    /**
     * 客服信息
     */
    @Column(name = "customerSer")
    @ApiModelProperty(value = "客服信息")
    private String customerSer;
    /**
     * 价格
     */
    @Column(name = "price")
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    /**
     * 状态 1:生效 0:未生效 2:下架
     */
    @Column(name = "status")
    @ApiModelProperty(value = "状态 1:生效 0:未生效 2:下架")
    private Integer status;
    /**
     * 限制的学员数量
     */
    @Column(name = "limitStuNum")
    @ApiModelProperty(value = "限制的学员数量")
    private Integer limitStuNum;
    /**
     * 购买人数
     */
    @Column(name = "payNum")
    @ApiModelProperty(value = "购买人数")
    private Integer payNum;

    /**
     * 课程数/活动数
     */
    @ApiModelProperty(value = "课程数/活动数")
    private Integer otherNum;

    /**
     * 是否支持预约 1:是 0:否
     */
    @Column(name = "isReservation")
    @ApiModelProperty(value = "否支持预约 1:是 0:否")
    private Integer isReservation;

    /**
     * 购买渠道 0:不可购买  1:线上及线下  2:只支持线上
     */
    @Column(name = "purchaseChannel")
    @ApiModelProperty(value = "购买渠道 0:不可购买  1:线上及线下  2:只支持线上")
    private Integer purchaseChannel;

    /**
     * 预约开始时间
     */
    @Column(name = "reservationBeginTime")
    @ApiModelProperty(value = "预约开始时间")
    private Date reservationBeginTime;

    /**
     * 预约结束时间
     */
    @Column(name = "reservationEndTime")
    @ApiModelProperty(value = "预约结束时间")
    private Date reservationEndTime;

    /**
     * 开售开始时间
     */
    @Column(name = "sellBeginTime")
    @ApiModelProperty(value = "开售开始时间")
    private Date sellBeginTime;

    /**
     * 开售结束时间
     */
    @Column(name = "sellEndTime")
    @ApiModelProperty(value = "开售结束时间")
    private Date sellEndTime;
    /**
     * 创建人
     */
    @Column(name = "createUserId")
    @ApiModelProperty(value = "创建人")
    private String createUserId;
    /**
     * 创建时间
     */
    @Column(name = "createTime")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 修改人
     */
    @Column(name = "createTime")
    @ApiModelProperty(value = "修改人")
    private String updateUserId;

    /**
     * 修改时间
     */
    @Column(name = "createTime")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 课程权益，多个用逗号分隔
     */
    @Column(name = "ability")
    @ApiModelProperty(value = "课程权益，多个用逗号分隔")
    private String ability;

    /**
     * 老师介绍
     */
    @ApiModelProperty(value = "老师介绍")
    private String content;

    /**
     * 是否可以体验预约
     */
    @ApiModelProperty(value = "是否可以体验预约")
    private Boolean free = false;

    
    /**
     * 客服电话
     */
    @ApiModelProperty(value = "客服电话")
    private String corporateMobile;
    
    /**
     * 客服微信
     */
    @ApiModelProperty(value = "客服微信")
    private String corporateWechatId;
    
    /**
     * 订单信息
     */
    /*@ApiModelProperty(value = "订单信息：如果不为空则代表当前用户已经购买了该课程/活动")
    private CourseBookedDto bookedDto;*/
    

    /**
     * 分类ID
     */
    @ApiModelProperty(value = "分类ID")
    @Column(name = "classifyId")
    private String classifyId;
    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称")
    @Column(name = "classifyName")
    private String classifyName;

    /**
     * 销售数量：此数量=限制人数时不能再购买
     */
    @Column(name = "saleNum")
    @ApiModelProperty(value = "销售数量：此数量=限制人数时不能再购买")
    private Integer saleNum;

    /**
     * 是否收藏 1:是 0:否
     */
    @ApiModelProperty(value = "是否收藏 1:是 0:否")
    private Integer collected;
    
    
    /**
     * 用户约课列表
     */
    @ApiModelProperty(value = "用户约课列表：用户在该课程下的预约列表")
    private List<CourseAboutDto> aboutDtos;
    
    /**
     * 活动情况下是否可以免费报名
     */
    @ApiModelProperty(value = "活动情况下是否可以免费报名")
    private Boolean freeActivity = false;
    
    /**
     * 活动状态：0=未开始，1=进行中，2=已结束
     */
    @Column(name = "activityStatus")
    @ApiModelProperty(value = "活动状态：0=未开始，1=进行中，2=已结束")
    private Integer activityStatus;
    
    @ApiModelProperty(value = "是否可以购买")
    private Boolean canBuy = true;

    @ApiModelProperty(value = "订单id")
    private Integer orderId ;

    @ApiModelProperty(value = "活动关联的课程")
    private List<CourseDto> courseDtoList ;

    @ApiModelProperty(value = "活动关联师资")
    private CourseDto teamDto;

    /**
     * 纬度
     */
    @Column(name = "latitude")
    @ApiModelProperty(value = "纬度")
    private Double latitude;

    /**
     * 经度
     */
    @Column(name = "longitude")
    @ApiModelProperty(value = "经度")
    private Double longitude;

    /**
     * 详细地址名称
     */
    @Column(name = "address")
    @ApiModelProperty(value = "详细地址名称")
    private String address;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @Column(name = "sort")
    private Integer sort;

}